{include file="public/header" /}
<form method="post">
    <div class="panel admin-panel">
        <div class="panel-head"><strong>{:lang('currency')['list']}</strong></div>
        <div class="padding border-bottom">
            <script>
                //city 参数和回调
                var pid="{:input('get.pid')}";
                var cid="{:input('get.cid')}";
                var aid="{:input('get.aid')}";
                var selectc = true;
                var selecta = true;
                function select_p(){
                    return false;
                }
                function select_c(){
                    return false;
                }
                function select_a(){
                    location.href="?pid="+pid+"&cid="+cid+"&aid="+aid;
                }
            </script>
            {:lang('label')['select']}{:lang('currency')['city']}:{include file="public/city" /}
        </div>
        <table class="table table-hover">
            <tr>
                <th width="50"></th>
                <th width="100">用户</th>
                <th width="100">真实姓名</th>
                <th width="100">提现帐号</th>
                <th width="100">金额</th>
                <th width="100">是否打款</th>
                <th width="200">申请日期</th>
                <th width="100">操作</th>
            </tr>
            {volist name="data" id="red"}
            <tr>
                <td >
                    <input type="checkbox" name="id" value="{$red.id}" />
                </td>
                <td style="line-height:40px">{$red.username}</td>
                <td style="line-height:40px">{$red.truename}</td>
                <td style="line-height:40px">{$red.account}</td>
                <td style="line-height:40px">￥{$red.money}</td>
                <td style="line-height:40px">{if $red.status == 2}待处理{elseif $red.status == 1}<span class="icon-check text-sub">{:lang('currency')['status_1']}</span>{else}<span style="color: red">已拒绝</span>{/if}</td>
                <td style="line-height:40px">{$red.lose_time|date='Y-m-d H:i:s',###}</td>
                <td style="line-height:40px">
                    <a class="button border-blue button-little" {if $red.status != 2}disabled{/if} {if $red.status == 2}href="javascript:set_status('__URL__/edit?id={$red.id}&status={$red.status}&page={:input('get.page')}&uid={$red.uid}')"{/if}>确认打款</a>
                    <a class="button border-yellow button-little" {if $red.status != 2}disabled{/if} {if $red.status == 2}href="__URL__/del.html?id={$red.id}&page={:input('get.page')}&uid={$red.uid}" onclick="if(confirm('拒绝？')){return true;}return false;"{/if}>拒绝提现</a>
                </td>
            </tr>
            {/volist}
        </table>
        {include file="public/pages" /}
    </div>
</form>
<script>
    $('#select_del').click(function(){
        var str="";
        $("input:checkbox[name=id]:checked").each(function(){
            str+=$(this).val()+",";
        });
        if(str!=''){
            if(confirm('拒绝？')){location.href='redpacket/del.html?id='+str+"&page={:input('get.page')}";}
        }
    });
    function set_status(url){
        if(confirm('请确认您已手动将提现金额转账至商户支付宝账户中')){
            location = url;
        }
    }
</script>
{include file="public/footer" /}